Inside Macintosh: Imaging with QuickDraw

Chapter Contents | Next

Offscreen Graphics Worlds

Overview

This chapter describes QuickDraw routines and data structures that your application can use to create offscreen graphics worlds. Whether your application uses Color QuickDraw or basic QuickDraw, you should read this chapter to improve your application's appearance and performance when it draws onscreen images.

Read this chapter to learn how to set up and use an offscreen graphics world --a sophisticated environment for preparing complex color or black-and-white images before displaying them on the screen. Offscreen graphics worlds are available on all Macintosh computers that support System 7.

You can use all of the drawing operations described in the chapters "QuickDraw Drawing" and "Color QuickDraw" in this book to create images in an offscreen graphics world. After preparing an image in an offscreen graphics world, you can use the CopyBits , CopyMask , or CopyDeepMask procedure to move the image to an onscreen color graphics port or basic graphics port. Color graphics ports are described in the chapter "Color QuickDraw," and basic graphics ports are described in the chapter "Basic QuickDraw" in this book.

To support your application in preparing an offscreen image for display on a screen, Color QuickDraw by default uses the screen's GDevice record to define the pixel depth and color table for the offscreen graphics world. The GDevice record is described in the chapter "Graphics Devices" in this book.

Your application can treat an offscreen graphics world as a virtual screen where your application has complete control over its drawing environment, and on which your application can draw a complex image where the user can't see the various steps your application must take before completing it. For example, your application can use QuickDraw drawing routines to build a complex color image in an offscreen graphics world; then, after building the image, your application can use CopyBits to copy it quickly to the screen. This prevents the choppiness that could occur if your application were to construct the image directly in a color graphics port on the screen.

Contents

About Offscreen Graphics Worlds

Using Offscreen Graphics Worlds

Offscreen Graphics Worlds Reference


© 1997 Apple Computer, Inc.

Chapter Contents | Next